﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using IService;
using Autofac;
using Common.AutofaExt;

namespace AutofacApi.Controllers
{
    [Route("[controller]/[action]")]
    [ApiController]
    public class SixthController : ControllerBase
    {
        private readonly IMicrophone _microphone;
        private readonly IPhone _phone;

        private readonly IEnumerable<IMicrophone> _IMicrophonelist;

        [CusotmSelect]
        public IMicrophone _IMicrophoneProp { get; set; }

        public IMicrophone _IMicrophoneProp1 { get; set; }

        public SixthController(IMicrophone microphone,IPhone phone,IEnumerable<IMicrophone> list,
            IServiceProvider serviceProvider,IComponentContext componentContext)
        {
            this._microphone = microphone;
            this._phone = phone;
            this._IMicrophonelist = list;
            IMicrophone microphone1 = serviceProvider.GetService<IMicrophone>()!;
            IMicrophone microphone2 = componentContext.Resolve<IMicrophone>();
        }

        [HttpGet]
        public string Index()
        {
            return "";
        }

    }
}
